import Vue from 'vue'
import Router from 'vue-router'


//import component
import Login from '../components/Login'
import Diary from '../components/Diary'
import Error from '../components/Error'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/diary',
      component: Diary
    },
    {
      path: '*',
      component: Error
    }
  ]
})
